package com.lqd.mall.system.service;

import com.lqd.mall.basis.constant.SecurityConstants;
import com.lqd.mall.basis.constant.ServiceNameConstants;
import com.lqd.mall.basis.response.CommonResult;
import com.lqd.mall.interaction.system.SysLogininforEntity;
import com.lqd.mall.system.service.factory.RemoteUserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author 零起点
 * @create 2022-03-19 10:38
 */

@FeignClient(contextId = "remoteSysLogininforService", value = ServiceNameConstants.SYSTEM_SERVICE,
        fallbackFactory = RemoteUserFallbackFactory.class)
public interface RemoteSysLogininforService {


    @PostMapping("logininfor/sava")
    CommonResult saveLogininfor(@RequestBody SysLogininforEntity sysLogininforEntity,
                                @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
